← Index
NYTProf Performance Profile   
For rbm/rbm
  Run on Wed Feb 12 20:36:06 2020
Reported on Wed Feb 12 21:42:25 2020

Filename(eval 14)[rbm/lib/RBM.pm:39]
StatementsExecuted 65 statements in 2.58ms
Eval Invoked At/root/tor-browser-build/rbm/lib/RBM.pm line 39
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1511624µs903msRBM::::__ANON__[:16]RBM::__ANON__[:16]
1511469µs891msRBM::::__ANON__[:10]RBM::__ANON__[:10]
11113µs53µsRBM::::BEGIN@2.7RBM::BEGIN@2.7
1119µs32µsRBM::::BEGIN@28RBM::BEGIN@28
0000s0sRBM::::__ANON__[:23]RBM::__ANON__[:23]
0000s0sRBM::::__ANON__[:41]RBM::__ANON__[:41]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# This part of the file contains options written in perl
22858µs292µs
# spent 53µs (13+40) within RBM::BEGIN@2.7 which was called: # once (13µs+40µs) by RBM::load_config_file at line 2
use IO::CaptureOutput qw(capture_exec);
# spent 53µs making 1 call to RBM::BEGIN@2.7 # spent 40µs making 1 call to Exporter::import
3(
4 var_p => {
5 # runc100 is true if we are using runc >= 1.0.0
6 # we assume that any version that is not 0.1.1 is >= 1.0.0
7
# spent 891ms (469µs+891) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:10] which was called 15 times, avg 59.4ms/call: # 15 times (469µs+891ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 59.4ms/call
runc100 => sub {
81569µs15891ms my ($out) = capture_exec('sudo', 'runc', '--version');
# spent 891ms making 15 calls to IO::CaptureOutput::capture_exec, avg 59.4ms/call
915446µs1586µs return !($out =~ m/^runc version 0.1.1/);
# spent 86µs making 15 calls to RBM::CORE:match, avg 6µs/call
10 },
11 # runc_spec100 is true if runc spec is at least 1.0.0
12 # We will need to update this when there is a new spec version available
13
# spent 903ms (624µs+902) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:16] which was called 15 times, avg 60.2ms/call: # 15 times (624µs+902ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 60.2ms/call
runc_spec100 => sub {
1415108µs15902ms my ($out) = capture_exec('sudo', 'runc', '--version');
# spent 902ms making 15 calls to IO::CaptureOutput::capture_exec, avg 60.1ms/call
1515961µs15390µs return $out =~ m/^.*spec: 1\.[0-9]+\.[0-9]+(?:-dev)?$/m;
# spent 390µs making 15 calls to RBM::CORE:match, avg 26µs/call
16 },
17 nightly_torbrowser_version => sub {
18 state $version = '';
19 return $version if $version;
20 my (undef, undef, undef, $day, $mon, $year) = gmtime;
21 $version = sprintf("tbb-nightly.%u.%02u.%02u", $year + 1900, $mon + 1, $day);
22 return $version;
23 },
24 nightly_torbrowser_incremental_from => sub {
25 my ($project, $options) = @_;
26 my $nightly_dir = project_config($project, 'basedir', $options) . '/nightly';
27 my $current_version = project_config($project, 'var/torbrowser_version', $options);
282124µs255µs
# spent 32µs (9+23) within RBM::BEGIN@28 which was called: # once (9µs+23µs) by RBM::load_config_file at line 28
use Path::Tiny;
# spent 32µs making 1 call to RBM::BEGIN@28 # spent 23µs making 1 call to Exporter::import
29 return [] unless -d $nightly_dir;
30 my @dirs = sort map { $_->basename } path($nightly_dir)->children(qr/^tbb-nightly\./);
31 my $nb_incr = project_config($project, ['var', 'max_torbrowser_incremental_from'], $options);
32 my @res;
33 while ($nb_incr > 0) {
34 my $dir = pop @dirs;
35 last unless $dir;
36 next if $dir eq $current_version;
37 $nb_incr--;
38 push @res, $dir;
39 }
40 return [@res];
41 },
42 },
43)
44112µs
45;